#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStackedWidget>
#include <QMediaPlayer>
#include <QAudioOutput>

class StartMenuWidget;
class PauseMenuWidget;
class AboutDialog;
class GameWidget;
class battle;



QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

public slots:
    void showStartMenu();
    void showPauseMenu();
    void showHelpUI();
    void exitGame();
    void showGameScreen();

private:
    Ui::MainWindow *ui;
    StartMenuWidget *startMenu;
    PauseMenuWidget *pauseMenu;
    AboutDialog *aboutDialog;
    GameWidget *gameWidget;
    battle * battleWidget;
    QMediaPlayer *bgmPlayer;  // 背景音乐播放器
    QAudioOutput *audioOutput;//音频输出设备成员


    void createWidgets();
    void connectSignals();
};

#endif // MAINWINDOW_H
